File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -711,23 +711,22 @@ def properties(self):
711711
712712 @staticmethod
713713 def _should_skip_member (name , klass ):
714- if (
714+ return (
715715 # Namedtuples should skip everything in their ._fields as the
716716 # docstrings for each of the members is: "Alias for field number X"
717717 issubclass (klass , tuple )
718718 and hasattr (klass , "_asdict" )
719719 and hasattr (klass , "_fields" )
720720 and name in klass ._fields
721- ):
722- return True
723- return False
721+ )
724722
725723 def _is_show_member (self , name ):
726- if self .show_inherited_members :
727- return True # show all class members
728- if name not in self ._cls .__dict__ :
729- return False # class member is inherited, we do not show it
730- return True
724+ return (
725+ # show all class members
726+ self .show_inherited_members
727+ # or class member is not inherited
728+ or name in self ._cls .__dict__
729+ )
731730
732731
733732def get_doc_object (
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def find_project_root(srcs: Sequence[str]):
3131 `Black <https://github.com/psf/black/blob/main/src/black/files.py>`_.
3232 """
3333 if not srcs :
34- return Path (). resolve (), "current directory"
34+ return Path . cwd (), "current directory"
3535
3636 common_path = Path (
3737 os .path .commonpath ([Path (src ).expanduser ().resolve () for src in srcs ])
You can’t perform that action at this time.
0 commit comments