| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,3 @@ | |||
| 1 | - # -*- coding: utf-8 -*- | ||
| 2 | 1 | # | |
| 3 | 2 | # smmap documentation build configuration file, created by | |
| 4 | 3 | # sphinx-quickstart on Wed Jun 8 15:14:25 2011. | |
@@ -38,8 +37,8 @@ | |||
| 38 | 37 | master_doc = 'index' | |
| 39 | 38 | ||
| 40 | 39 | # General information about the project. | |
| 41 | - project = u'smmap' | ||
| 42 | - copyright = u'2011, Sebastian Thiel' | ||
| 40 | + project = 'smmap' | ||
| 41 | + copyright = '2011, Sebastian Thiel' | ||
| 43 | 42 | ||
| 44 | 43 | # The version info for the project you're documenting, acts as replacement for | |
| 45 | 44 | # |version| and |release|, also used in various other places throughout the | |
@@ -173,8 +172,8 @@ | |||
| 173 | 172 | # Grouping the document tree into LaTeX files. List of tuples | |
| 174 | 173 | # (source start file, target name, title, author, documentclass [howto/manual]). | |
| 175 | 174 | latex_documents = [ | |
| 176 | - ('index', 'smmap.tex', u'smmap Documentation', | ||
| 177 | - u'Sebastian Thiel', 'manual'), | ||
| 175 | + ('index', 'smmap.tex', 'smmap Documentation', | ||
| 176 | + 'Sebastian Thiel', 'manual'), | ||
| 178 | 177 | ] | |
| 179 | 178 | ||
| 180 | 179 | # The name of an image file (relative to this directory) to place at the top of | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ | |||
| 11 | 11 | import smmap | |
| 12 | 12 | ||
| 13 | 13 | if os.path.exists("README.md"): | |
| 14 | - long_description = open('README.md', "r", encoding="utf-8").read().replace('\r\n', '\n') | ||
| 14 | + long_description = open('README.md', encoding="utf-8").read().replace('\r\n', '\n') | ||
| 15 | 15 | else: | |
| 16 | 16 | long_description = "See https://github.com/gitpython-developers/smmap" | |
| 17 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | __all__ = ["SlidingWindowMapBuffer"] | |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | - class SlidingWindowMapBuffer(object): | ||
| 7 | + class SlidingWindowMapBuffer: | ||
| 8 | 8 | ||
| 9 | 9 | """A buffer like object which allows direct byte-wise object and slicing into | |
| 10 | 10 | memory of a mapped file. The mapping is controlled by the provided cursor. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ | |||
| 15 | 15 | #}END utilities | |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | - class WindowCursor(object): | ||
| 18 | + class WindowCursor: | ||
| 19 | 19 | ||
| 20 | 20 | """ | |
| 21 | 21 | Pointer into the mapped region of the memory manager, keeping the map | |
@@ -233,7 +233,7 @@ def fd(self): | |||
| 233 | 233 | #} END interface | |
| 234 | 234 | ||
| 235 | 235 | ||
| 236 | - class StaticWindowMapManager(object): | ||
| 236 | + class StaticWindowMapManager: | ||
| 237 | 237 | ||
| 238 | 238 | """Provides a manager which will produce single size cursors that are allowed | |
| 239 | 239 | to always map the whole file. | |
@@ -486,7 +486,7 @@ class SlidingWindowMapManager(StaticWindowMapManager): | |||
| 486 | 486 | ||
| 487 | 487 | def __init__(self, window_size=-1, max_memory_size=0, max_open_handles=sys.maxsize): | |
| 488 | 488 | """Adjusts the default window size to -1""" | |
| 489 | - super(SlidingWindowMapManager, self).__init__(window_size, max_memory_size, max_open_handles) | ||
| 489 | + super().__init__(window_size, max_memory_size, max_open_handles) | ||
| 490 | 490 | ||
| 491 | 491 | def _obtain_region(self, a, offset, size, flags, is_recursive): | |
| 492 | 492 | # bisect to find an existing region. The c++ implementation cannot | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | 9 | #{ Utilities | |
| 10 | 10 | ||
| 11 | - class FileCreator(object): | ||
| 11 | + class FileCreator: | ||
| 12 | 12 | ||
| 13 | 13 | """A instance which creates a temporary file with a prefix and a given size | |
| 14 | 14 | and provides this info to the user. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from __future__ import print_function | ||
| 2 | - | ||
| 3 | 1 | from .lib import TestBase, FileCreator | |
| 4 | 2 | ||
| 5 | 3 | from smmap.mman import ( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from __future__ import print_function | ||
| 2 | - | ||
| 3 | 1 | from .lib import TestBase, FileCreator | |
| 4 | 2 | ||
| 5 | 3 | from smmap.mman import ( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,7 @@ def is_64_bit(): | |||
| 34 | 34 | ||
| 35 | 35 | #{ Utility Classes | |
| 36 | 36 | ||
| 37 | - class MapWindow(object): | ||
| 37 | + class MapWindow: | ||
| 38 | 38 | ||
| 39 | 39 | """Utility type which is used to snap windows towards each other, and to adjust their size""" | |
| 40 | 40 | __slots__ = ( | |
@@ -80,7 +80,7 @@ def extend_right_to(self, window, max_size): | |||
| 80 | 80 | self.size = min(self.size + (window.ofs - self.ofs_end()), max_size) | |
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | - class MapRegion(object): | ||
| 83 | + class MapRegion: | ||
| 84 | 84 | ||
| 85 | 85 | """Defines a mapped region of memory, aligned to pagesizes | |
| 86 | 86 | ||
@@ -198,7 +198,7 @@ class MapRegionList(list): | |||
| 198 | 198 | ) | |
| 199 | 199 | ||
| 200 | 200 | def __new__(cls, path): | |
| 201 | - return super(MapRegionList, cls).__new__(cls) | ||
| 201 | + return super().__new__(cls) | ||
| 202 | 202 | ||
| 203 | 203 | def __init__(self, path_or_fd): | |
| 204 | 204 | self._path_or_fd = path_or_fd | |
| Back | FazBrowse Home | New Git URL |
0 commit comments