MCPcopy Create free account
hub / github.com/aio-libs/multidict / add_line

Method add_line

tools/upgrade_pythoncapi.py:556–569  ·  view source on GitHub ↗
(self, content, line)

Source from the content-addressed store, hash-verified

554 return operations
555
556 def add_line(self, content, line):
557 # Use the first matching newline
558 match = re.search(r'(?:\r\n|\n|\r)', content)
559 newline = match.group(0) if match else '\n'
560
561 line = line + newline
562 # FIXME: tolerate trailing spaces
563 if line not in content:
564 # FIXME: add macro after the first header comment
565 # FIXME: add macro after includes
566 # FIXME: add macro after: #define PY_SSIZE_T_CLEAN
567 return line + newline + content
568 else:
569 return content
570
571 def add_pythoncapi_compat(self, content):
572 if self._has_pythoncapi_compat:

Callers 1

add_pythoncapi_compatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected