Skip to content

Fix typos #536

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -338,7 +338,7 @@ Please update your code accordingly.

### Fixed

- Root dir of MemoryFS accesible as a file
- Root dir of MemoryFS accessible as a file
- Packaging issues @televi
- Deprecation warning re collections.Mapping

2 changes: 1 addition & 1 deletion docs/source/guide.rst
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ This can be a useful debugging aid!
Closing
~~~~~~~

FS objects have a :meth:`~fs.base.FS.close` methd which will perform any required clean-up actions. For many filesystems (notably :class:`~fs.osfs.OSFS`), the ``close`` method does very little. Other filesystems may only finalize files or release resources once ``close()`` is called.
FS objects have a :meth:`~fs.base.FS.close` method which will perform any required clean-up actions. For many filesystems (notably :class:`~fs.osfs.OSFS`), the ``close`` method does very little. Other filesystems may only finalize files or release resources once ``close()`` is called.

You can call ``close`` explicitly once you are finished using a filesystem. For example::

2 changes: 1 addition & 1 deletion docs/source/info.rst
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ file::

resource_info = fs.getinfo('myfile.txt', namespaces=['details', 'access'])

In addition to the specified namespaces, the fileystem will also return
In addition to the specified namespaces, the filesystem will also return
the ``basic`` namespace, which contains the name of the resource, and a
flag which indicates if the resource is a directory.

10 changes: 5 additions & 5 deletions fs/base.py
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ def getinfo(self, path, namespaces=None):
Arguments:
path (str): A path to a resource on the filesystem.
namespaces (list, optional): Info namespaces to query. The
`"basic"` namespace is alway included in the returned
`"basic"` namespace is always included in the returned
info, whatever the value of `namespaces` may be.

Returns:
@@ -834,7 +834,7 @@ def getsyspath(self, path):

def getospath(self, path):
# type: (Text) -> bytes
"""Get the *system path* to a resource, in the OS' prefered encoding.
"""Get the *system path* to a resource, in the OS' preferred encoding.

Arguments:
path (str): A path on the filesystem.
@@ -846,7 +846,7 @@ def getospath(self, path):
fs.errors.NoSysPath: If there is no corresponding system path.

This method takes the output of `~getsyspath` and encodes it to
the filesystem's prefered encoding. In Python3 this step is
the filesystem's preferred encoding. In Python3 this step is
not required, as the `os` module will do it automatically. In
Python2.7, the encoding step is required to support filenames
on the filesystem that don't encode correctly.
@@ -1544,11 +1544,11 @@ def touch(self, path):

def validatepath(self, path):
# type: (Text) -> Text
"""Validate a path, returning a normalized absolute path on sucess.
"""Validate a path, returning a normalized absolute path on success.

Many filesystems have restrictions on the format of paths they
support. This method will check that ``path`` is valid on the
underlaying storage mechanism and throw a
underlying storage mechanism and throw a
`~fs.errors.InvalidPath` exception if it is not.

Arguments:
2 changes: 1 addition & 1 deletion fs/errors.py
Original file line number Diff line number Diff line change
@@ -170,7 +170,7 @@ def __reduce__(self):


class InvalidPath(PathError):
"""Path can't be mapped on to the underlaying filesystem."""
"""Path can't be mapped on to the underlying filesystem."""

default_message = "path '{path}' is invalid on this filesystem "

2 changes: 1 addition & 1 deletion fs/info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Container for filesystem resource informations.
"""Container for filesystem resource information.
"""

from __future__ import absolute_import, print_function, unicode_literals
2 changes: 1 addition & 1 deletion fs/tempfs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Manage filesystems in temporary locations.

A temporary filesytem is stored in a location defined by your OS
A temporary filesystem is stored in a location defined by your OS
(``/tmp`` on linux). The contents are deleted when the filesystem
is closed.

4 changes: 2 additions & 2 deletions fs/test.py
Original file line number Diff line number Diff line change
@@ -499,7 +499,7 @@ def test_getinfo(self):
except (TypeError, ValueError):
raise AssertionError("info should be JSON serializable")

# Non existant namespace is not an error
# Non existent namespace is not an error
no_info = self.fs.getinfo("foo", "__nosuchnamespace__").raw
self.assertIsInstance(no_info, dict)
self.assertEqual(no_info["basic"], {"name": "foo", "is_dir": False})
@@ -629,7 +629,7 @@ def test_move(self):
self.fs.move("foo2", "bar", overwrite=True)
self.assert_not_exists("foo2")

# Check moving to a non-existant directory
# Check moving to a non-existent directory
with self.assertRaises(errors.ResourceNotFound):
self.fs.move("bar", "egg/bar")

2 changes: 1 addition & 1 deletion tests/test_tree.py
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ def test_error(self):

def broken_filterdir(path, **kwargs):
if path.startswith("/deep/deep1/"):
# Because error messages differ accross Python versions
# Because error messages differ across Python versions
raise Exception("integer division or modulo by zero")
return filterdir(path, **kwargs)