Skip to content

Commit

Permalink
Update ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm committed Jan 29, 2024
1 parent d136988 commit fffdfcc
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# - hypothesis
# - jupyterlab
# - ipython
# - gspread
# - gspread-dataframe
# - gspread-formatting
# - gspread<6.0
# - httpx
# - httpx-auth
# - matplotlib
Expand All @@ -28,6 +28,8 @@
# - seaborn
#

--extra-index-url https://pxxfT18jZFLGiGMsKh9s@pypi.fury.io/babbel/

annotated-types==0.6.0
# via pydantic
anyio==4.2.0
Expand Down
8 changes: 5 additions & 3 deletions requirements/requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# [constraints] requirements.txt
#
# - mypy~=1.7
# - ruff~=0.1.6
# - gspread
# - ruff~=0.1.14
# - gspread-dataframe
# - gspread-formatting
# - gspread<6.0
# - httpx
# - httpx-auth
# - matplotlib
Expand All @@ -23,6 +23,8 @@
# - seaborn
#

--extra-index-url https://pxxfT18jZFLGiGMsKh9s@pypi.fury.io/babbel/

annotated-types==0.6.0
# via
# -c requirements.txt
Expand Down Expand Up @@ -315,7 +317,7 @@ rsa==4.9
# via
# -c requirements.txt
# google-auth
ruff==0.1.9
ruff==0.1.14
# via hatch.envs.lint
scipy==1.11.4
# via
Expand Down
2 changes: 1 addition & 1 deletion src/pytanis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
finally:
del version, PackageNotFoundError

__all__ = ['__version__', 'GSheetsClient', 'PretalxClient', 'HelpDeskClient', 'get_cfg']
__all__ = ['GSheetsClient', 'HelpDeskClient', 'PretalxClient', '__version__', 'get_cfg']

# transform structlog into a logging-friendly package
# use `logging.basicConfig(level=logging.INFO, stream=sys.stdout)` as usual
Expand Down
2 changes: 1 addition & 1 deletion src/pytanis/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# Color type of matplotlib: https://matplotlib.org/stable/tutorials/colors/colors.html
ColorType = str | tuple[float, float, float] | tuple[float, float, float, float]

__all__ = ['GSheetsClient', 'gsheet_rows_for_fmt', 'PermissionDeniedError']
__all__ = ['GSheetsClient', 'PermissionDeniedError', 'gsheet_rows_for_fmt']

_logger = get_logger()

Expand Down
2 changes: 1 addition & 1 deletion src/pytanis/pretalx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from pytanis.pretalx.client import PretalxClient
from pytanis.pretalx.utils import reviews_as_df, speakers_as_df, subs_as_df

__all__ = ['PretalxClient', 'subs_as_df', 'speakers_as_df', 'reviews_as_df']
__all__ = ['PretalxClient', 'reviews_as_df', 'speakers_as_df', 'subs_as_df']
14 changes: 7 additions & 7 deletions src/pytanis/pretalx/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,24 @@ class Event(BaseModel):

class SpeakerAvailability(BaseModel):
# ToDo: Check the datatypes here again, not mentioned in the API
id: int # noqa: A003
id: int
start: str
end: str
allDay: str = Field(..., alias='all_day') # noqa: N815


class AnswerQuestionRef(BaseModel):
id: int # noqa: A003
id: int
question: MultiLingualStr


class Option(BaseModel):
id: int # noqa: A003
id: int
answer: MultiLingualStr


class Answer(BaseModel):
id: int # noqa: A003
id: int
answer: str
answer_file: str | None = None
question: AnswerQuestionRef
Expand Down Expand Up @@ -149,7 +149,7 @@ class User(BaseModel):


class Review(BaseModel):
id: int # noqa: A003
id: int
submission: str
user: str
text: str | None = None
Expand All @@ -165,7 +165,7 @@ class RoomAvailability(BaseModel):


class Room(BaseModel):
id: int # noqa: A003
id: int
name: MultiLingualStr
description: MultiLingualStr
capacity: int | None = None
Expand All @@ -181,7 +181,7 @@ class QuestionRequirement(Enum):


class Question(BaseModel):
id: int # noqa: A003
id: int
variant: str
target: str
question: MultiLingualStr
Expand Down
6 changes: 2 additions & 4 deletions tests/helpdesk/test_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def test_sending_dummy_mail(tmp_config):
]
test_mail = Mail(
subject='Pytanis API TEST: Ignore this message from {mail.data.me}',
text=dedent(
"""
text=dedent("""
Hello {recipient.address_as},
this is an automated test message via our helpdesk using https://florianwilhelm.info/pytanis/!
Expand All @@ -30,8 +29,7 @@ def test_sending_dummy_mail(tmp_config):
How is your work at {recipient.data.company}? We contact you because of a {mail.data.reason}!
Cheers!
"""
),
"""),
team_id='3f68251e-17e9-436f-90c3-c03b06a72472', # Program
agent_id='2d8b5727-49c8-410d-bae8-0da13a65609d', # Program
status='solved',
Expand Down

0 comments on commit fffdfcc

Please sign in to comment.