File tree 2 files changed +9
-10
lines changed
2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -711,23 +711,22 @@ def properties(self):
711
711
712
712
@staticmethod
713
713
def _should_skip_member (name , klass ):
714
- if (
714
+ return (
715
715
# Namedtuples should skip everything in their ._fields as the
716
716
# docstrings for each of the members is: "Alias for field number X"
717
717
issubclass (klass , tuple )
718
718
and hasattr (klass , "_asdict" )
719
719
and hasattr (klass , "_fields" )
720
720
and name in klass ._fields
721
- ):
722
- return True
723
- return False
721
+ )
724
722
725
723
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
+ )
731
730
732
731
733
732
def get_doc_object (
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def find_project_root(srcs: Sequence[str]):
31
31
`Black <https://github.com/psf/black/blob/main/src/black/files.py>`_.
32
32
"""
33
33
if not srcs :
34
- return Path (). resolve (), "current directory"
34
+ return Path . cwd (), "current directory"
35
35
36
36
common_path = Path (
37
37
os .path .commonpath ([Path (src ).expanduser ().resolve () for src in srcs ])
You can’t perform that action at this time.
0 commit comments