Improve tools.chmod method description with pynumdoc#18038
Merged
czoido merged 8 commits intoconan-io:develop2from Mar 31, 2025
Merged
Improve tools.chmod method description with pynumdoc#18038czoido merged 8 commits intoconan-io:develop2from
czoido merged 8 commits intoconan-io:develop2from
Conversation
Signed-off-by: Uilian Ries <uilianries@gmail.com>
czoido
reviewed
Mar 28, 2025
czoido
reviewed
Mar 28, 2025
czoido
reviewed
Mar 28, 2025
czoido
reviewed
Mar 28, 2025
czoido
reviewed
Mar 28, 2025
conan/tools/files/files.py
Outdated
| conanfile : object | ||
| The current recipe object. Always use ``self``. | ||
| path : str | ||
| Path to the file or directory to change the permissions. |
Contributor
There was a problem hiding this comment.
suggesting some minor changes, I think it may sound a bit better like that. Suggested for read but could be applied to all.
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
czoido
reviewed
Mar 28, 2025
conan/tools/files/files.py
Outdated
| @@ -265,16 +265,49 @@ def chdir(conanfile, newdir): | |||
|
|
|||
|
|
|||
| def chmod(conanfile, path:str, read:bool=None, write:bool=None, execute:bool=None, recursive:bool=False): | |||
Contributor
There was a problem hiding this comment.
The arguments should be also changed here to Optional, not only y the docstring
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
czoido
reviewed
Mar 28, 2025
conan/tools/files/files.py
Outdated
| def chmod(conanfile, path:str, read:bool=None, write:bool=None, execute:bool=None, recursive:bool=False): | ||
| """ | ||
| Change the permissions of a file or directory. The same as the Unix command chmod, but simplified. | ||
| def chmod(conanfile, path:str, read:Optional[bool]=None, write:Optional[bool]=None, execute:Optional[bool]=None, recursive:Optional[bool]=False): |
Contributor
There was a problem hiding this comment.
Why is recursive Optional? Can it be None?
Member
Author
There was a problem hiding this comment.
No, it only can be True/False. Fixed by 3511a9b
Signed-off-by: Uilian Ries <uilianries@gmail.com>
czoido
reviewed
Mar 31, 2025
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
memsharded
approved these changes
Mar 31, 2025
czoido
approved these changes
Mar 31, 2025
This file contains hidden or 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
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.
This PR is a follow-up of the previous #17800, by updating only its docstring, following numpydoc format, which can be forwarded to the Conan docs without extra effort there.
The idea comes from conan-io/docs#4038 (comment)
Changelog: Omit
Docs: Omit
developbranch, documenting this one.