- Create the following folders:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
default_language_version: | |
python: python3.9 | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: 'v4.0.1' | |
hooks: | |
- id: mixed-line-ending | |
args: [ '--fix=lf' ] | |
- id: trailing-whitespace |
This file contains hidden or 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
import argparse | |
import sys | |
# as seen in https://github.com/python/cpython/pull/29217 | |
def download(): | |
parser = argparse.ArgumentParser( | |
description="Download the provided URL (FTP/HTTP/HTTPS supported) " |
This file contains hidden or 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
class C: | |
__match_args__ = ("__match_self_prop__",) | |
def __init__(self, x, y=42): | |
self.x = x | |
self.y = y | |
@property | |
def __match_self_prop__(self): | |
return self |