Skip to content

Commit

Permalink
Move to a full package layout.
Browse files Browse the repository at this point in the history
This evades silly typing restrictions, namely that py.typed can't be
used with single files.
  • Loading branch information
Julian committed Oct 28, 2024
1 parent 6e68403 commit 5e79580
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/check_for_differences
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -x
rm -rf source_data
git clone https://github.com/Mottie/github-reserved-names.git source_data && \
# Create what would be generated by source_data
python3 bin/parse_source_data > github_reserved_names.py && \
python3 bin/parse_source_data > github_reserved_names/__init__.py && \

# See if anything has changed
git diff --exit-code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
at https://npm.im/github-reserved-names.
"""

# Autogenerated on 2024-10-28T17:48:03.216470+00:00.
# Autogenerated on 2024-10-28T20:23:35.712261+00:00.
# Don't edit this file directly, it's generated by `bin/parse_source_data`.

ALL: set[str] = {
Expand Down
Empty file.
File renamed without changes.
9 changes: 4 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
ROOT = Path(__file__).parent
PYPROJECT = ROOT / "pyproject.toml"
BIN = ROOT / "bin"
FILE = ROOT / "github_reserved_names.py"
TESTS = ROOT / "test_github_reserved_names.py"
PACKAGE = ROOT / "github_reserved_names"


SUPPORTED = ["3.9", "3.10", "pypy3.10", "3.11", "3.12", "3.13"]
Expand All @@ -32,7 +31,7 @@ def tests(session):
Run the test suite with a corresponding Python version.
"""
session.install("pytest", ROOT)
session.run("pytest", TESTS)
session.run("pytest", PACKAGE)


@session()
Expand Down Expand Up @@ -61,7 +60,7 @@ def style(session):
Check Python code style.
"""
session.install("ruff")
session.run("ruff", "check", BIN, FILE, TESTS, __file__)
session.run("ruff", "check", BIN, PACKAGE, __file__)


@session()
Expand All @@ -70,4 +69,4 @@ def typing(session):
Check static typing.
"""
session.install("pyright", ROOT)
session.run("pyright", *session.posargs, FILE)
session.run("pyright", *session.posargs, PACKAGE)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ from-first = true

[tool.ruff.lint.per-file-ignores]
"noxfile.py" = ["ANN", "D100", "S101", "T201"]
"test_*.py" = ["ANN", "D", "RUF012", "S", "PLR", "TRY"]
"github_reserved_names/tests/*" = ["ANN", "D", "RUF012", "S", "PLR", "TRY"]

0 comments on commit 5e79580

Please sign in to comment.