-
Notifications
You must be signed in to change notification settings - Fork 8
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
Denote every field which is omitted when None. #106
Open
EliRibble
wants to merge
2
commits into
smkent:main
Choose a base branch
from
EliRibble:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
There are some fields that can be sent with `null` values over JSON, which means they are set to `None` within Python. The broad config-based exclude directive is not given any information about the field, only it's value, so we can't use it to determine if a field should be excluded or not in the dict that gets built. Instead we create a helper function to build a field definition that has the necessary exclude function. Any field that does not use this helper function is permitted to be None/null. This is true of the MailboxGet.ids field in this commit. A new test is added to maintain the behavior over time.
smkent
added a commit
that referenced
this pull request
Jul 9, 2024
Applied updates from upstream project template commits: smkent/cookie-python@ef0eb85...9404738 * 9404738 Merge pull request #106 from smkent/manage |\ | * c3a564f Add get_branch() to mock repo response in manage unit tests | * b4dd69d Add html_url to mock repo response in manage unit tests | * ae30c7c Improve GitHub API/repo interactions in manage-cookie * | 36c238b Merge pull request #105 from smkent/manage-cookie |\ \ | |/ |/| | * b0dc20f Update project template cruft, dependencies |/ * 9cedf76 Merge pull request #104 from smkent/actions |\ | * c85a1a5 Add CODECOV_TOKEN to codecov action in CI workflow | * 6624aeb Update Github action versions |/ * 9e52fa1 Merge pull request #103 from smkent/manage-cookie |\ | * 36078ed Update dependencies |/ * 9313b3e Merge pull request #102 from smkent/temp-cache-dir |\ | * 4f47bdc Use temp dir for Poetry cache directory in manage-cookie |/ * 95be994 Merge pull request #101 from smkent/manage-cookie |\ | * 22e3bcf Apply automatic linting fixes | * 4faeb9b Update dependencies |/ * b7ed95d Merge pull request #100 from smkent/manage-cookie * 97c1031 Update project template cruft, dependencies Updated project dependencies via `poetry update`: Package operations: 1 install, 29 updates, 1 removal - Removing setuptools (69.1.1) - Updating certifi (2024.2.2 -> 2024.7.4) - Updating idna (3.6 -> 3.7) - Updating pygments (2.17.2 -> 2.18.0) - Updating types-python-dateutil (2.8.19.20240106 -> 2.9.0.20240316) - Updating urllib3 (2.2.1 -> 2.2.2) - Updating filelock (3.13.1 -> 3.15.4) - Updating jinja2 (3.1.3 -> 3.1.4) - Updating platformdirs (4.2.0 -> 4.2.2) - Updating pluggy (1.4.0 -> 1.5.0) - Updating requests (2.31.0 -> 2.32.3) - Updating typing-extensions (4.10.0 -> 4.12.2) - Updating packaging (23.2 -> 24.1) - Installing shellingham (1.5.4) - Updating coverage (7.4.3 -> 7.5.4) - Updating gitpython (3.1.42 -> 3.1.43) - Updating identify (2.5.35 -> 2.6.0) - Updating nodeenv (1.8.0 -> 1.9.1) - Updating typer (0.9.0 -> 0.12.3) - Updating marshmallow (3.21.1 -> 3.21.3) - Updating pytest (8.0.2 -> 8.2.2) - Updating virtualenv (20.25.1 -> 20.26.3) - Updating bandit (1.7.7 -> 1.7.9) - Updating black (24.2.0 -> 24.4.2) - Updating dataclasses-json (0.6.4 -> 0.6.7) - Updating mypy (1.8.0 -> 1.10.1) - Updating pep8-naming (0.13.3 -> 0.14.1) - Updating poethepoet (0.25.0 -> 0.27.0) - Updating pytest-cov (4.1.0 -> 5.0.0) - Updating responses (0.25.0 -> 0.25.3) - Updating types-requests (2.31.0.20240218 -> 2.32.0.20240622) Writing lock file
smkent
added a commit
that referenced
this pull request
Jul 9, 2024
Applied updates from upstream project template commits: smkent/cookie-python@ef0eb85...dee411e * dee411e Merge pull request #107 from smkent/poetry |\ | * 42c4a3b Update Poetry to version 1.8 in CI workflows * | 8831a68 Merge pull request #108 from smkent/manage |\ \ | |/ |/| | * 296f6b5 Fix CODECOV_TOKEN reference rendering in template CI workflow |/ * 9404738 Merge pull request #106 from smkent/manage |\ | * c3a564f Add get_branch() to mock repo response in manage unit tests | * b4dd69d Add html_url to mock repo response in manage unit tests | * ae30c7c Improve GitHub API/repo interactions in manage-cookie * | 36c238b Merge pull request #105 from smkent/manage-cookie |\ \ | |/ |/| | * b0dc20f Update project template cruft, dependencies |/ * 9cedf76 Merge pull request #104 from smkent/actions |\ | * c85a1a5 Add CODECOV_TOKEN to codecov action in CI workflow | * 6624aeb Update Github action versions |/ * 9e52fa1 Merge pull request #103 from smkent/manage-cookie |\ | * 36078ed Update dependencies |/ * 9313b3e Merge pull request #102 from smkent/temp-cache-dir |\ | * 4f47bdc Use temp dir for Poetry cache directory in manage-cookie |/ * 95be994 Merge pull request #101 from smkent/manage-cookie |\ | * 22e3bcf Apply automatic linting fixes | * 4faeb9b Update dependencies |/ * b7ed95d Merge pull request #100 from smkent/manage-cookie * 97c1031 Update project template cruft, dependencies Updated project dependencies via `poetry update`: Package operations: 1 install, 29 updates, 1 removal - Removing setuptools (69.1.1) - Updating certifi (2024.2.2 -> 2024.7.4) - Updating idna (3.6 -> 3.7) - Updating pygments (2.17.2 -> 2.18.0) - Updating types-python-dateutil (2.8.19.20240106 -> 2.9.0.20240316) - Updating urllib3 (2.2.1 -> 2.2.2) - Updating filelock (3.13.1 -> 3.15.4) - Updating jinja2 (3.1.3 -> 3.1.4) - Updating packaging (23.2 -> 24.1) - Updating pluggy (1.4.0 -> 1.5.0) - Installing shellingham (1.5.4) - Updating platformdirs (4.2.0 -> 4.2.2) - Updating requests (2.31.0 -> 2.32.3) - Updating typing-extensions (4.10.0 -> 4.12.2) - Updating coverage (7.4.3 -> 7.5.4) - Updating gitpython (3.1.42 -> 3.1.43) - Updating identify (2.5.35 -> 2.6.0) - Updating marshmallow (3.21.1 -> 3.21.3) - Updating nodeenv (1.8.0 -> 1.9.1) - Updating pytest (8.0.2 -> 8.2.2) - Updating typer (0.9.0 -> 0.12.3) - Updating virtualenv (20.25.1 -> 20.26.3) - Updating bandit (1.7.7 -> 1.7.9) - Updating black (24.2.0 -> 24.4.2) - Updating dataclasses-json (0.6.4 -> 0.6.7) - Updating mypy (1.8.0 -> 1.10.1) - Updating pep8-naming (0.13.3 -> 0.14.1) - Updating poethepoet (0.25.0 -> 0.27.0) - Updating pytest-cov (4.1.0 -> 5.0.0) - Updating responses (0.25.0 -> 0.25.3) - Updating types-requests (2.31.0.20240218 -> 2.32.0.20240622) Writing lock file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are some fields that can be sent with
null
values over JSON, which means they are set toNone
within Python. The broad config-based exclude directive is not given any information about the field, only it's value, so we can't use it to determine if a field should be excluded or not in the dict that gets built.Instead we create a helper function to build a field definition that has the necessary exclude function. Any field that does not use this helper function is permitted to be None/null. This is true of the MailboxGet.ids field in this commit. A new test is added to maintain the behavior over time.
Resolves #105