🐞 Types cased like Constants
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Current Behavior
There are some types such as GUARDIAN_ID that are cased incorrectly. These variables function as types and not constants and therefore should be using “CapWords” since these are actually functioning as Type’s.
https://www.python.org/dev/peps/pep-0008/
Expected Behavior
Global Constants should be capitalized with underscores
THRESHOLD = 3
Classes and Types should be like this:
GuardianId = str
Steps To Reproduce
No response
Environment
- OS: Any
Anything else?
It’s probably helpful just to look at the types from this level for speed.
https://github.com/microsoft/electionguard-python/blob/main/src/electionguard/__init__.py https://github.com/microsoft/electionguard-python/blob/main/src/electionguard_tools/__init__.py https://github.com/microsoft/electionguard-python/blob/main/src/electionguard_verify/__init__.py
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Programming Case Types !Explained | Nerd For Tech - Medium
1. camelCase ; 2. snake_case ; 3. kebab-case ; 4. PascalCase.
Read more >type error when #Template variables is used in same element
When declaring a template variable using # and then using the template variable immediately within the element it is declared on I get...
Read more >naming - What are the different kinds of cases? - Stack Overflow
There are many more colorful suggestions, like caterpillar-case, ... say that our variable is a constant) and PascalCase for class names.
Read more >Think before using BuildConfig.DEBUG - ProAndroidDev
Last week I was working on a feature that syncs data between phone and backend. That sync mechanism is triggered under certain conditions ......
Read more >Decoding of optionals missing in json - Swift Forums
I've never had a situation where it was dire to differentiate the “present but null” and “not present” situations, but in such cases...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@faraazb Interesting dilemma. That’s a good catch.
Change to Private In this case, I think the best case is to change these to private. These don’t need to be exported since these are simply strings and shouldn’t be cast. These types are strings and serving the purpose of making these more readable.
_AuxiliaryPublicKey_AuxiliarySecretKey_Message_EncryptedMessageOther notes: There is probably an overall naming scheme around public key that should get revisited @AddressXception .
@keithrfung There is already a class named
AuxiliaryPublicKey. So should I postfix the typeAUXILIARY_PUBLIC_KEYwith ‘Type’ and rename it asAuxiliaryPublicKeyType? We also have AUXILIARY_SECRET_KEY, so should I append ‘Type’ to that as well to be consistent?