Skip to content

Improve module typing and add match-newline-at-toplevel feature #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bruno-who-likes
Copy link

Enhanced rewrite method with match-newline-at-toplevel flag, added corresponding test case, specified type annotations, transitioned to Poetry, and integrated Nox for linting, formatting, and testing.

The project's dependency management has been completely overhauled. Files associated with the old system (like .travis.yml, Pipfile, setup.cfg, and setup.py) have been deleted. A new pyproject.toml file, which is used by the poetry tool, has been added.
…ions

The .gitignore file has been greatly expanded to include files and directories created by a variety of tools and configurations used in Python development. It now covers everything from byte-compiled files, distribution packaging, unit test reports, to dependency lock files and environment settings.
This change includes the addition of noxfile.py, setting up sessions for running tests, linters, type checking, and code formatting.
@ChrisTimperley
Copy link
Owner

Thanks for the PR! It's quite large 😅 If you want to break out the match-newline-at-toplevel feature into a separate PR, I'd love to take a look and merge that. I'm also happy to look at some of these changes individually (as separate PRs), but I won't merge in all of these changes. In particular, I'm not keen to break existing APIs (e.g., by renaming the base class used by exceptions).

@bruno-who-likes
Copy link
Author

Hi Chris, thank you for your comment.

  • I got a little carried away when I was adding the match-newline-at-toplevel feature. I will make a separate PR that just includes that.
  • I wanted to ask if you are open to updating the type system from List[...], Dict[...,...] to list[...], dict[...,...] etc. According to mypy the old system is necessary for Python 3.8 and earlier. The other upgrade would be to replace Optional[...] with ... | None. If you are open to some aspect of this, let me know how you would like this PR to be structured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants