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

make SP files linter compliant #298

Merged
merged 2 commits into from
Oct 15, 2024
Merged

make SP files linter compliant #298

merged 2 commits into from
Oct 15, 2024

Conversation

akcano
Copy link
Contributor

@akcano akcano commented Oct 14, 2024

This addresses #208.

Copy link

Make sure to keep .github/workflows/automatic-doc-checks.yml and sp-files/.github/workflows/automatic-doc-checks.yml in sync!

Copy link
Contributor

@rkratky rkratky left a comment

Choose a reason for hiding this comment

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

Thanks, @akcano. LGTM. I haven't run the linters we use in some of our sw projects on it yet, but off the top of my head, I recall that 'pycodestyle' also complains about "too many leading '#' in block comments". So, in conf.py, that would mean adjusting to, for example:

############################################################
# Project information
############################################################

(Only one # on the middle line.)

url = "https://api.github.com/repos/canonical/praecepta/contents/styles/config/vocabularies/Canonical"
r = requests.get(url)
for item in r.json():
download = requests.get(item["download_url"])
file = open(".sphinx/styles/config/vocabularies/Canonical/" + item["name"], "w")
file.write(download.text)
file.close()
config = requests.get("https://raw.githubusercontent.com/canonical/praecepta/main/vale.ini")
config = requests.get(
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious what linter complains about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ruff.

@akcano
Copy link
Contributor Author

akcano commented Oct 15, 2024

Thanks, @akcano. LGTM. I haven't run the linters we use in some of our sw projects on it yet, but off the top of my head, I recall that 'pycodestyle' also complains about "too many leading '#' in block comments". So, in conf.py, that would mean adjusting to, for example:

############################################################
# Project information
############################################################

(Only one # on the middle line.)

OK, I'll run that as well.

Copy link

Make sure to keep .github/workflows/automatic-doc-checks.yml and sp-files/.github/workflows/automatic-doc-checks.yml in sync!

@akcano
Copy link
Contributor Author

akcano commented Oct 15, 2024

This is probably the farthest I can take it without different linting styles bumping heads.

@akcano akcano merged commit acafeff into canonical:main Oct 15, 2024
5 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.

2 participants