Skip to content

Commit

Permalink
Merge pull request #6 from ssssank/fix_code_style
Browse files Browse the repository at this point in the history
Fix code style
  • Loading branch information
mokevnin authored Apr 1, 2022
2 parents f6560bd + 583e8c6 commit a42d963
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ pip install hexlet-immutable-fs-trees

```python

>>> import hexlet.fs as fs
>>> fs.is_file(fs.mkfile('config'))
True
>>> fs.is_directory(fs.mkdir('etc'))
True
>>> tree = fs.mkdir('etc', [fs.mkfile('config'), fs.mkfile('hosts')])
>>> children = fs.get_children(tree)
>>> fs.get_name(children[0])
'config'
>>> list(map(lambda item: fs.get_name(item), children))
['config', 'hosts']
>>>
import hexlet.fs as fs
fs.is_file(fs.mkfile('config')) # True
fs.is_directory(fs.mkdir('etc')) # True
tree = fs.mkdir('etc', [fs.mkfile('config'), fs.mkfile('hosts')])
children = fs.get_children(tree)
fs.get_name(children[0]) # 'config'
list(map(lambda item: fs.get_name(item), children)) # ['config', 'hosts']
```

[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://ru.hexlet.io/pages/about)
Expand Down

0 comments on commit a42d963

Please sign in to comment.