🤖 Repository layout updated to latest Python version
This commit was automatically generated by a script: https://gitfub.space/Jmaa/python-omni
This commit is contained in:
parent
78c12110fe
commit
e13c5faf9a
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,6 +4,7 @@
|
||||||
/secrets/
|
/secrets/
|
||||||
/private_deps/
|
/private_deps/
|
||||||
/data/
|
/data/
|
||||||
|
/config/
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
69
ruff.toml
Normal file
69
ruff.toml
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
#[tool.ruff]
|
||||||
|
lint.select = [ 'ALL' ]
|
||||||
|
lint.ignore = [
|
||||||
|
'ANN', # Type annotations (lots of work.)
|
||||||
|
'FBT', # Boolean trap is bullshit.
|
||||||
|
'C90', 'PLR0911', 'PLR0915', 'PLR0913', # Code complexity measures are bullshit.
|
||||||
|
'Q003', 'D205', # Format conflict
|
||||||
|
|
||||||
|
'TCH', # Microoptimization at the cost of readability
|
||||||
|
|
||||||
|
'D100', 'D101', 'D102', 'D103', 'D104', 'D105', 'D106', 'D107', 'D300', 'D401', # Missing docstrings (lots of work)
|
||||||
|
'TD002', 'TD003', 'TD004', 'FIX', # Who cares about TODO standards?
|
||||||
|
"E501", 'PLR0912', 'PTH123', 'F405', 'E402', 'PLW0603',
|
||||||
|
|
||||||
|
'SIM102',
|
||||||
|
|
||||||
|
'TRY002', 'TRY003',
|
||||||
|
]
|
||||||
|
|
||||||
|
# Autofix
|
||||||
|
lint.fixable = [
|
||||||
|
'SIM', 'C', 'Q', 'D',
|
||||||
|
'UP035', 'UP004', 'UP032', 'UP006', 'UP007', 'I001',
|
||||||
|
'F401', 'COM812', 'B011', 'PLR1722', 'PLR0402', 'S101',
|
||||||
|
]
|
||||||
|
lint.unfixable = ['SIM102', 'SIM114']
|
||||||
|
|
||||||
|
# Exclude a variety of commonly ignored directories.
|
||||||
|
exclude = [
|
||||||
|
".bzr",
|
||||||
|
".direnv",
|
||||||
|
".eggs",
|
||||||
|
".git",
|
||||||
|
".hg",
|
||||||
|
".mypy_cache",
|
||||||
|
".nox",
|
||||||
|
".pants.d",
|
||||||
|
".pytype",
|
||||||
|
".ruff_cache",
|
||||||
|
".svn",
|
||||||
|
".tox",
|
||||||
|
".venv",
|
||||||
|
"__pypackages__",
|
||||||
|
"_build",
|
||||||
|
"buck-out",
|
||||||
|
"build",
|
||||||
|
"dist",
|
||||||
|
"node_modules",
|
||||||
|
"venv",
|
||||||
|
]
|
||||||
|
|
||||||
|
# Same as Black.
|
||||||
|
line-length = 88
|
||||||
|
|
||||||
|
# Allow unused variables when underscore-prefixed.
|
||||||
|
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||||
|
|
||||||
|
# Assume Python 3.10.
|
||||||
|
target-version = "py310"
|
||||||
|
|
||||||
|
[lint.flake8-quotes]
|
||||||
|
inline-quotes = "single"
|
||||||
|
multiline-quotes = "double"
|
||||||
|
docstring-quotes = "double"
|
||||||
|
|
||||||
|
[format]
|
||||||
|
quote-style = "single"
|
||||||
|
indent-style = "space"
|
||||||
|
docstring-code-format = true
|
4
setup.py
4
setup.py
|
@ -15,7 +15,6 @@ PACKAGE_NAME = 'fin_depo'
|
||||||
with open('README.md') as f:
|
with open('README.md') as f:
|
||||||
readme = f.read()
|
readme = f.read()
|
||||||
|
|
||||||
|
|
||||||
def parse_version_file(text: str) -> str:
|
def parse_version_file(text: str) -> str:
|
||||||
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
||||||
if match is None:
|
if match is None:
|
||||||
|
@ -23,11 +22,9 @@ def parse_version_file(text: str) -> str:
|
||||||
raise Exception(msg)
|
raise Exception(msg)
|
||||||
return match.group(2)
|
return match.group(2)
|
||||||
|
|
||||||
|
|
||||||
with open(PACKAGE_NAME + '/_version.py') as f:
|
with open(PACKAGE_NAME + '/_version.py') as f:
|
||||||
version = parse_version_file(f.read())
|
version = parse_version_file(f.read())
|
||||||
|
|
||||||
|
|
||||||
def parse_requirements(text: str) -> list[str]:
|
def parse_requirements(text: str) -> list[str]:
|
||||||
return text.strip().split('\n')
|
return text.strip().split('\n')
|
||||||
|
|
||||||
|
@ -49,6 +46,7 @@ def determine_short_description(readme: str) -> str:
|
||||||
|
|
||||||
REQUIREMENTS_MAIN = """
|
REQUIREMENTS_MAIN = """
|
||||||
enforce-typing
|
enforce-typing
|
||||||
|
fin-defs @ git+https://gitfub.space:Jmaa/fin-defs.git
|
||||||
"""
|
"""
|
||||||
|
|
||||||
REQUIREMENTS_TEST = """
|
REQUIREMENTS_TEST = """
|
||||||
|
|
Loading…
Reference in New Issue
Block a user