Skip to content

drop python2, add typing hint, rename naming to follow pep8#22

Merged
lidaobing merged 7 commits into
lidaobing:masterfrom
chuiniudawang:master
Jul 6, 2026
Merged

drop python2, add typing hint, rename naming to follow pep8#22
lidaobing merged 7 commits into
lidaobing:masterfrom
chuiniudawang:master

Conversation

@chuiniudawang

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread AGENTS.md Outdated
Comment thread lunardate.py
Comment thread README.md Outdated
Comment thread README.md Outdated
@chuiniudawang chuiniudawang requested a review from lidaobing July 5, 2026 08:44
Comment thread lunardate.py Outdated
Comment thread lunardate.py
Comment thread lunardate.py
Comment thread lunardate.py Outdated
Comment thread lunardate.py
Comment thread lunardate.py
Comment thread lunardate.py
Comment thread lunardate.py Outdated
Comment thread lunardate.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes python-lunardate by dropping Python 2-era API naming, adding type annotations, and updating packaging/CI to reflect a Python 3-only support stance.

Changes:

  • Declare Python 3-only support in packaging metadata and classifiers.
  • Rename public APIs to PEP 8 snake_case while keeping some deprecated aliases.
  • Add type checking to CI (mypy) and update documentation examples accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
setup.py Adds python_requires and updates supported Python classifiers.
README.md Updates usage examples and link formatting to match renamed APIs.
lunardate.py Adds typing, introduces snake_case APIs + deprecations, and refactors internal naming.
lunardate.egg-info/PKG-INFO Updates generated metadata/version fields and classifiers.
.github/workflows/python-package.yml Adds mypy to CI dependency install and runs a mypy step.
Comments suppressed due to low confidence (1)

lunardate.egg-info/PKG-INFO:5

  • lunardate.egg-info/PKG-INFO looks like generated packaging metadata. Tracking generated egg-info in git tends to create churn/inconsistencies (and it currently embeds usage examples that reference deprecated camelCase APIs). Consider removing egg-info from version control and generating it only during builds/releases.
Metadata-Version: 2.4
Name: lunardate
Version: 0.2.2
Summary: A Chinese Calendar Library in Pure Python
Home-page: https://github.com/lidaobing/python-lunardate

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lunardate.py Outdated
Comment on lines +138 to +141
def __str__(self) -> str:
return 'LunarDate(%d, %d, %d, %d)' % (self.year, self.month, self.day, self.is_leap_month)

__repr__ = __str__
__repr__: ClassVar = __str__
Comment thread lunardate.py Outdated
Comment thread lunardate.py
Comment thread lunardate.py Outdated
@lidaobing

Copy link
Copy Markdown
Owner

LGTM

@lidaobing lidaobing self-requested a review July 6, 2026 05:47
@lidaobing lidaobing merged commit d4b445c into lidaobing:master Jul 6, 2026
3 checks passed
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