Skip to content
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

Add stubs for python-cronlog #8917

Merged
merged 9 commits into from
Oct 20, 2022
Merged

Conversation

kasium
Copy link
Contributor

@kasium kasium commented Oct 18, 2022

No description provided.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Thank you! I added a number of comments and suggested some more precise types. In general, the stubs use the Incomplete marker unnecessarily too much.

stubs/python-crontab/cronlog.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/cronlog.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontab.pyi Outdated Show resolved Hide resolved
@AlexWaygood
Copy link
Member

#8472 has some discussion about why we prefer to leave parameters unannotated rather than using Incomplete everywhere, if you're interested :)

Pyright will likely start complaining if you remove some of the Incomplete annotations as @JelleZijlstra suggests; you'll have to add an entry to the excludelist here to stop it complaining:

"exclude": [
"stdlib/distutils/command",
"stdlib/lib2to3/refactor.pyi",
"stdlib/multiprocessing/reduction.pyi",
"stdlib/sqlite3/dbapi2.pyi",
"stdlib/_tkinter.pyi",
"stdlib/tkinter/__init__.pyi",
"stdlib/tkinter/commondialog.pyi",
"stdlib/tkinter/dialog.pyi",
"stdlib/tkinter/dnd.pyi",
"stdlib/tkinter/filedialog.pyi",
"stdlib/tkinter/messagebox.pyi",
"stdlib/tkinter/scrolledtext.pyi",
"stdlib/tkinter/tix.pyi",
"stdlib/tkinter/ttk.pyi",
"stdlib/xml/dom/NodeFilter.pyi",
"stdlib/xml/dom/expatbuilder.pyi",
"stdlib/xml/dom/minidom.pyi",
"stdlib/xml/dom/pulldom.pyi",
"stdlib/xml/sax",
"stubs/aiofiles/aiofiles/tempfile/temptypes.pyi",
"stubs/aiofiles/aiofiles/threadpool/utils.pyi",
"stubs/annoy/annoy/annoylib.pyi",
"stubs/aws-xray-sdk",
"stubs/babel",
"stubs/backports.ssl_match_hostname",
"stubs/bleach",
"stubs/boto",
"stubs/beautifulsoup4",
"stubs/braintree",
"stubs/caldav",
"stubs/cffi",
"stubs/commonmark",
"stubs/console-menu",
"stubs/cryptography",
"stubs/dateparser",
"stubs/dj-database-url",
"stubs/docutils",
"stubs/editdistance/editdistance/bycython.pyi",
"stubs/Flask-SQLAlchemy",
"stubs/fpdf2",
"stubs/html5lib",
"stubs/httplib2",
"stubs/humanfriendly",
"stubs/invoke",
"stubs/jmespath",
"stubs/jsonschema",
"stubs/ldap3",
"stubs/Markdown",
"stubs/mock",
"stubs/mysqlclient",
"stubs/oauthlib",
"stubs/openpyxl",
"stubs/Pillow",
"stubs/paramiko",
"stubs/prettytable",
"stubs/protobuf",
"stubs/pytz/pytz/lazy.pyi",
"stubs/pytz/pytz/reference.pyi",
"stubs/pytz/pytz/tzfile.pyi",
"stubs/google-cloud-ndb",
"stubs/paho-mqtt",
"stubs/passlib",
"stubs/peewee",
"stubs/pep8-naming",
"stubs/psutil",
"stubs/psycopg2",
"stubs/pyflakes",
"stubs/Pygments",
"stubs/PyMySQL",
"stubs/python-dateutil",
"stubs/python-jose",
"stubs/pyvmomi",
"stubs/pywin32",
"stubs/PyYAML",
"stubs/redis",
"stubs/requests",
"stubs/Send2Trash",
"stubs/setuptools",
"stubs/simplejson",
"stubs/slumber",
"stubs/SQLAlchemy",
"stubs/stripe",
"stubs/tqdm",
"stubs/tree-sitter",
"stubs/tzlocal/tzlocal/utils.pyi",
"stubs/ttkthemes",
"stubs/urllib3",
"stubs/vobject"
],

@github-actions

This comment has been minimized.

stubs/python-crontab/crontabs.pyi Outdated Show resolved Hide resolved
stubs/python-crontab/crontabs.pyi Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit a9236f9 into python:master Oct 20, 2022
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