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 type checks and typing #38

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add type checks and typing #38

wants to merge 5 commits into from

Conversation

fizyk
Copy link
Owner

@fizyk fizyk commented Nov 24, 2020

No description provided.

@codecov-io
Copy link

codecov-io commented Nov 24, 2020

Codecov Report

Merging #38 (6b66abb) into master (f4700cd) will increase coverage by 1.60%.
The diff coverage is 69.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   51.13%   52.74%   +1.60%     
==========================================
  Files           9        9              
  Lines         440      474      +34     
==========================================
+ Hits          225      250      +25     
- Misses        215      224       +9     
Flag Coverage Δ
unittests 52.74% <69.89%> (+1.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pyramid_basemodel/container.py 0.00% <0.00%> (ø)
src/pyramid_basemodel/root.py 0.00% <0.00%> (ø)
src/pyramid_basemodel/tree.py 0.00% <0.00%> (ø)
src/pyramid_basemodel/util.py 69.84% <81.81%> (+5.13%) ⬆️
src/pyramid_basemodel/slug.py 91.22% <89.47%> (-2.53%) ⬇️
src/pyramid_basemodel/__init__.py 95.69% <100.00%> (+0.40%) ⬆️
src/pyramid_basemodel/blob.py 76.08% <100.00%> (-1.00%) ⬇️
src/pyramid_basemodel/mixin.py 92.30% <100.00%> (+0.30%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4700cd...6b66abb. Read the comment docs.

@fizyk fizyk force-pushed the typing branch 4 times, most recently from 6b122e6 to fef7600 Compare November 27, 2020 22:15
@fizyk fizyk force-pushed the typing branch 4 times, most recently from a69ca2b to 61e2042 Compare December 8, 2020 22:26
@fizyk fizyk force-pushed the typing branch 2 times, most recently from bf2b954 to 360fc0c Compare December 15, 2020 22:20
@fizyk fizyk force-pushed the typing branch 2 times, most recently from 7b5d97f to 0c96949 Compare January 4, 2021 17:14
@@ -55,10 +59,10 @@ class and ``bind_engine`` function.
class classproperty:
Copy link
Owner Author

Choose a reason for hiding this comment

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

it's problematic to type it properly. Maybe it could be rewritten from the properties actually...

"""Get human readable name, e.g.: `Foo Bar`."""
return Column(Unicode(cls._max_slug_length), nullable=False)

def set_slug(
self,
candidate=None,
gen_digest=generate_random_digest,
inspect=sa_inspect,
Copy link
Owner Author

Choose a reason for hiding this comment

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

simplify outside of this pr

gen_digest=generate_random_digest,
inspect=sa_inspect,
session=Session,
to_slug=slugify.slugify,
Copy link
Owner Author

Choose a reason for hiding this comment

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

and this as well

@fizyk fizyk force-pushed the typing branch 2 times, most recently from e08982c to 563d74f Compare January 8, 2021 22:05
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.

None yet

2 participants