-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from Mr-Sunglasses/release/2
Release/2
- Loading branch information
Showing
8 changed files
with
122 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: mypy paste.py 🐍 | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup PDM | ||
uses: pdm-project/setup-pdm@v3 | ||
with: | ||
python-version: 3.11 | ||
cache: true | ||
cache-dependency-path: "**/pdm.lock" | ||
- name: Install dependencies | ||
run: pdm install | ||
- name: Run mypy | ||
run: pdm mypy |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[mypy] | ||
ignore_missing_imports = True | ||
disallow_untyped_defs = True |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import random | ||
import string | ||
import os | ||
from pathlib import Path | ||
|
||
|
||
def generate_uuid(): | ||
def generate_uuid() -> str: | ||
# Combine uppercase letters, lowercase letters, and digits | ||
characters = string.ascii_letters + string.digits | ||
characters: str = string.ascii_letters + string.digits | ||
|
||
# Generate a random 4-character code | ||
random_code = ''.join(random.choice(characters) for _ in range(4)) | ||
random_code: str = "".join(random.choice(characters) for _ in range(4)) | ||
|
||
return random_code | ||
|
||
|
||
def extract_extension(file_name): | ||
def extract_extension(file_name: Path) -> str: | ||
_, extension = os.path.splitext(file_name) | ||
return extension |
This file contains 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