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

v1.6.4 - Consider Not Capitalizing Proper Nouns if Other Capital Letters Exist in the Word #193

Closed
rmartin16 opened this issue Apr 27, 2023 · 2 comments · Fixed by #195
Closed
Labels
C: stakeholder Relates to docformatter stakeholder requested behavior P: enhancement Feature that is outside the scope of PEP 257
Milestone

Comments

@rmartin16
Copy link

This one may be a bit opinionated...but when a docstring starts with a proper noun that does not start with a capital letter, docformatter is now capitalizing it.

Example:

@pytest.fixture(scope="session", autouse=True)
def client():
-    """qBittorrent Client for testing session."""
+    """QBittorrent Client for testing session."""
    client = Client()

I can imagine other words like iOS, macOS, eBay etc. being affected.

Since detecting whether a word is a proper noun isn't trivial, perhaps detecting if the first word has other capital letters may be sufficient. Alternatively, saying, "wait on #144" may make sense too.

@github-actions github-actions bot added the fresh This is a new issue label Apr 27, 2023
@weibullguy
Copy link
Member

I wonder if a configuration option might be warranted? Say a list of words not to capitalize. I suspect for any given project, it would be a relatively short list. But, it would be generic enough that a user could choose to not capitalize words that were all lowercase if they wanted.

@weibullguy weibullguy added P: enhancement Feature that is outside the scope of PEP 257 C: stakeholder Relates to docformatter stakeholder requested behavior and removed fresh This is a new issue labels Apr 28, 2023
@rmartin16
Copy link
Author

That's probably the safest best to avoid additional corner cases...for instance, geoCities should be capitalized despite other capital letter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: stakeholder Relates to docformatter stakeholder requested behavior P: enhancement Feature that is outside the scope of PEP 257
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants