-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4a44d1b
Showing
8 changed files
with
508 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Python-generated files | ||
__pycache__/ | ||
*.py[oc] | ||
build/ | ||
dist/ | ||
wheels/ | ||
*.egg-info | ||
|
||
# Virtual environments | ||
.venv |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.2.2 | ||
hooks: | ||
# run the formatter | ||
- id: ruff-format | ||
# run the linter | ||
- id: ruff | ||
verbose: true | ||
# Ignore the exit code of ruff to pass the commit, but still show the output | ||
entry: bash -c 'ruff "$@" || true' -- | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
# Enable verbose output for the 'mypy' hook. | ||
verbose: true | ||
# Ignore the exit code of mypy to pass the commit, but still show the output | ||
entry: bash -c 'mypy "$@" || true' -- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# IDCrockford |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
[project] | ||
name = "idcrockford" | ||
dynamic = ["version"] | ||
description = "Crockford Base32 ID generation and validation" | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "saif", email = "[email protected]" } | ||
] | ||
requires-python = ">=3.12" | ||
dependencies = [] | ||
|
||
[project.scripts] | ||
idcrockford = "idcrockford.__main__:main" | ||
|
||
[tool.flit.module] | ||
name = "idcrockford" | ||
|
||
[build-system] | ||
requires = ["flit_core>=3.2,<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[tool.ruff] | ||
line-length = 110 | ||
show-fixes = true | ||
|
||
[tool.ruff.lint] | ||
extend-select = [ | ||
"F", # pyflakes | ||
"E", # pycodestyle (PEP 8) E for error | ||
"W", # pycodestyle (PEP 8) W for warning | ||
"I", # flake8-isort | ||
"B", # flake8-bugbear | ||
"N", # PEP8 Naming Conventions | ||
"S", # flake8-bandit for Security checks | ||
"T20", # flake8-print | ||
"PT", # flake8-pytest-style | ||
"Q", # flake8-quotes | ||
"TID", # flake8-tidy-imports | ||
"SIM", # flake8-simplify | ||
"DTZ", # flake8-datetimez | ||
"C90", # flake8-complexity | ||
] | ||
extend-ignore = [ | ||
"B012", | ||
"N818", | ||
"N999", | ||
"TID252", | ||
"W191", | ||
"E111", | ||
"E114", | ||
"E117", | ||
"Q000", | ||
"Q001", | ||
"Q002", | ||
"Q003", | ||
] | ||
|
||
[tool.ruff.lint.mccabe] | ||
max-complexity = 15 | ||
|
||
[tool.ruff.format] | ||
quote-style = "double" | ||
docstring-code-format = true | ||
indent-style = "tab" | ||
|
||
[tool.ruff.lint.isort] | ||
combine-as-imports = true | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"*/tests/*" = ["S101"] | ||
"*/test_*" = ["S101"] | ||
"*/__main__.py" = ["T20"] |
Oops, something went wrong.