This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.mypy] | |
strict = true | |
[tool.isort] # pyproject.toml, .isort.cfg = [settings] | |
profile = "black" | |
multi_line_output = 3 | |
lines_after_imports = 2 | |
lines_between_sections = 0 # novk | |
force_alphabetical_sort_within_sections = true # vk | |
include_trailing_comma = true # vk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transform_to_datetime(date_string: str) -> datetime: | |
"""Normalises different datetimes and turns them into `datetime` | |
objects. | |
Needed in case time output from the site changes in the future. | |
Parameters | |
---------- | |
date_string : str | |
Datetime presented in `str` format. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
########################################################################################################## | |
# I've used this pre-commit hook in my FastAPI app. It launches `bash` session (even on Windows) from the root dir of your project. | |
# Meaning if you have a following project structure: | |
############################### | |
# app/ # | |
# .git # | |
# __pycache__ # | |
# .mypy_cache # | |
# config/ # |
NewerOlder