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

Capitalize attribute properties instead of uppercase #320

Merged
merged 3 commits into from
May 11, 2023

Conversation

javabster
Copy link
Collaborator

@javabster javabster commented May 11, 2023

fixes #194

I didn't test locally as we don't have any classes that use the @dataclasses.dataclass decorator yet, but I validated the changes using the inspect tool on https://qiskit.org/documentation/stable/0.41/stubs/qiskit.algorithms.optimizers.OptimizerState.html

I opted to just force those specific properties that live under the Attributes section to be capitalized., instead of removing the uppercase setting at the higher level, as that uppercase setting is used for the main CLASS header at the top of the page.

Before:
Screenshot 2023-05-11 at 2 53 40 PM

After:

Screenshot 2023-05-11 at 3 20 44 PM

@javabster javabster changed the title Capitalize properties instead of uppercase Capitalize attribute properties instead of uppercase May 11, 2023
@javabster
Copy link
Collaborator Author

switched to use none instead of capitalise. I couldn't find much info on recommendations for using none vs unset vs initial in CSS so I just opted for none so we don't potentially get screwed over by some unintentional css inheritance
Screenshot 2023-05-11 at 3 20 44 PM

Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Excellent! Thanks! FYI I updated the PR description with your new screenshot because the PR description will be used for the commit message when we merge.

@Eric-Arellano Eric-Arellano merged commit badf85b into Qiskit:main May 11, 2023
2 checks passed
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.

Hard-to-read capitalisation of type hints in class attributes
2 participants