df181cd3cd83899c344b0ac9b0be9867f96a5799,docs/hacks.py,,,#,66

Before Change




// Hack to figure out if we are the latest version
url = "https://raw.githubusercontent.com/rodluger/starry/gh-pages/versions.txt"
all_versions = []
for line in urllib.request.urlopen(url):
    version_string = line.decode("utf-8").replace("\n", "").strip()
    all_versions.append(packaging.version.parse(version_string))
all_versions = sorted(all_versions)
current_version = packaging.version.parse(starry.__version__)
is_latest = (current_version.is_devrelease) and (
    current_version.base_version >= all_versions[-1].base_version

After Change


starry._RadialVelocityMap = _RadialVelocityMap


replace = {
    "_SphericalHarmonicMap": "Map",
    "_LimbDarkenedMap": "Map",
    "_ReflectedLightMap": "Map",
    "_RadialVelocityMap": "Map",
}


def format_name(self) -> str:
    name = ".".join(self.objpath) or self.modname
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: rodluger/starry
Commit Name: df181cd3cd83899c344b0ac9b0be9867f96a5799
Time: 2019-12-23
Author: rodluger@gmail.com
File Name: docs/hacks.py
Class Name:
Method Name:


Project Name: commonsense/conceptnet5
Commit Name: db4b9f4d50af9e83733fc301c32e85cbe6d9c812
Time: 2014-02-25
Author: rob@luminoso.com
File Name: conceptnet5/builders/json_to_solr.py
Class Name:
Method Name: convert_to_solr


Project Name: CyberReboot/NetworkML
Commit Name: d3babe1252d05f07e58a6602b47e1a09bbd56af5
Time: 2019-12-10
Author: josh@vandervecken.com
File Name: networkml/parsers/pcap/reader.py
Class Name:
Method Name: packetizer