Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect args ["--application-directories", "src"], nothing doing #421

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ repos:
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: ["--application-directories", "src"]
- repo: https://github.com/psf/black
rev: 23.12.0
hooks:
Expand Down
14 changes: 7 additions & 7 deletions caldav/davclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
from urllib.parse import unquote

import requests
from lxml import etree
from lxml.etree import _Element
from requests.auth import AuthBase
from requests.models import Response
from requests.structures import CaseInsensitiveDict

from .elements.base import BaseElement
from caldav.elements import dav
from caldav.lib import error
from caldav.lib.python_utilities import to_normal_str
Expand All @@ -22,13 +29,6 @@
from caldav.objects import log
from caldav.objects import Principal
from caldav.requests import HTTPBearerAuth
from lxml import etree
from lxml.etree import _Element
from requests.auth import AuthBase
from requests.models import Response
from requests.structures import CaseInsensitiveDict

from .elements.base import BaseElement

if TYPE_CHECKING:
pass
Expand Down
5 changes: 3 additions & 2 deletions caldav/elements/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
from typing import Optional
from typing import Union

from caldav.lib.namespace import nsmap
from caldav.lib.python_utilities import to_unicode
from lxml import etree
from lxml.etree import _Element

from caldav.lib.namespace import nsmap
from caldav.lib.python_utilities import to_unicode

if sys.version_info < (3, 9):
from typing import Iterable
else:
Expand Down
3 changes: 1 addition & 2 deletions caldav/elements/cdav.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
from typing import ClassVar
from typing import Optional

from caldav.lib.namespace import ns

from .base import BaseElement
from .base import NamedBaseElement
from .base import ValuedBaseElement
from caldav.lib.namespace import ns

utc_tz = timezone.utc

Expand Down
3 changes: 1 addition & 2 deletions caldav/elements/dav.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env python
from typing import ClassVar

from caldav.lib.namespace import ns

from .base import BaseElement
from .base import ValuedBaseElement
from caldav.lib.namespace import ns


# Operations
Expand Down
3 changes: 1 addition & 2 deletions caldav/elements/ical.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env python
from typing import ClassVar

from caldav.lib.namespace import ns

from .base import ValuedBaseElement
from caldav.lib.namespace import ns


# Properties
Expand Down
1 change: 1 addition & 0 deletions caldav/lib/vcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import uuid

import icalendar

from caldav.lib.python_utilities import to_normal_str

## Global counter. We don't want to be too verbose on the users, ref https://github.com/home-assistant/core/issues/86938
Expand Down
6 changes: 3 additions & 3 deletions caldav/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ class hierarchy into a separate file)

import icalendar
import vobject
from caldav.lib.python_utilities import to_normal_str
from caldav.lib.python_utilities import to_unicode
from caldav.lib.python_utilities import to_wire
from dateutil.rrule import rrulestr
from lxml import etree
from lxml.etree import _Element
Expand All @@ -41,6 +38,9 @@ class hierarchy into a separate file)
from .elements.base import BaseElement
from .elements.cdav import CalendarData
from .elements.cdav import CompFilter
from caldav.lib.python_utilities import to_normal_str
from caldav.lib.python_utilities import to_unicode
from caldav.lib.python_utilities import to_wire

try:
from typing import ClassVar, Optional, Union
Expand Down
5 changes: 3 additions & 2 deletions examples/scheduling_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
from datetime import timedelta
from datetime import timezone

from caldav import DAVClient
from caldav import error
from icalendar import Calendar
from icalendar import Event

from caldav import DAVClient
from caldav import error


###############
### SETUP START
Expand Down
32 changes: 16 additions & 16 deletions tests/test_caldav.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@
import pytest
import requests
import vobject
from requests.packages import urllib3

from . import compatibility_issues
from .conf import caldav_servers
from .conf import client
from .conf import proxy
from .conf import proxy_noport
from .conf import radicale_host
from .conf import radicale_port
from .conf import rfc6638_users
from .conf import test_radicale
from .conf import test_xandikos
from .conf import xandikos_host
from .conf import xandikos_port
from .proxy import NonThreadingHTTPServer
from .proxy import ProxyHandler
from caldav.davclient import DAVClient
from caldav.davclient import DAVResponse
from caldav.elements import cdav
Expand All @@ -41,22 +57,6 @@
from caldav.objects import FreeBusy
from caldav.objects import Principal
from caldav.objects import Todo
from requests.packages import urllib3

from . import compatibility_issues
from .conf import caldav_servers
from .conf import client
from .conf import proxy
from .conf import proxy_noport
from .conf import radicale_host
from .conf import radicale_port
from .conf import rfc6638_users
from .conf import test_radicale
from .conf import test_xandikos
from .conf import xandikos_host
from .conf import xandikos_port
from .proxy import NonThreadingHTTPServer
from .proxy import ProxyHandler

if test_xandikos:
from xandikos.web import XandikosBackend, XandikosApp
Expand Down
3 changes: 2 additions & 1 deletion tests/test_caldav_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
from unittest import mock
from urllib.parse import urlparse

import caldav
import icalendar
import lxml.etree
import pytest
import vobject

import caldav
from caldav import Calendar
from caldav import CalendarObjectResource
from caldav import CalendarSet
Expand Down
1 change: 1 addition & 0 deletions tests/test_cdav.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import datetime

import tzlocal

from caldav.elements.cdav import _to_utc_date_string
from caldav.elements.cdav import CalendarQuery

Expand Down
1 change: 1 addition & 0 deletions tests/test_vcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import icalendar
import pytest
import vobject

from caldav.lib import vcal
from caldav.lib.python_utilities import to_normal_str
from caldav.lib.python_utilities import to_wire
Expand Down
Loading